from django.urls import path, include
from common.views import dict, upload_file
from rest_framework import routers

router = routers.SimpleRouter()
router.register(r"dict/detail/list", dict.DataDictionaryDetailListViewSet, basename="dict_detail_list")
router.register(r"dict/detail", dict.DataDictionaryDetailTreeViewSet, basename="dict_detail")
router.register(r"dict", dict.DataDictionaryViewSet, basename="dict")

urlpatterns = [
    path(r"api/", include(router.urls)),
    path(r'api/file/upload/', upload_file.UploadFileAPIView.as_view(), name='upload_file'),
    path(r'api/file/download/', upload_file.DownLoadFileAPIView.as_view(), name='download_file'),
    path(r'api/file/delete/', upload_file.DeleteFileAPIView.as_view(), name='delete_file'),
]
